package com.huaxin.hxmoduleworkorder.common.annotation.validation;

import com.huaxin.hxmoduleworkorder.common.validator.MaintenanceOrderStatusValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = MaintenanceOrderStatusValidator.class)
public @interface ValidMaintenanceOrderStatus {

    String message() default "无效的维保单流程状态，允许值：created/reviewing/assigned/processing/resolved/evaluating/completed/rejected/cancelled";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
